# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-authenticator
pkgver=4.1.1
pkgrel=0
pkgdesc="Two-Factor Authentication application"
url="https://gitlab.gnome.org/World/Authenticator"
# armhf, armv7: pipewire-rs fails to build on 32-bit musl
# s390x, riscv64 blocked by libadwaita -> gtk4
# x86, ppc64le building dependency ring v0.16.20 fails
arch="all !armhf !armv7 !s390x !riscv64 !x86 !ppc64le"
license="GPL-3.0-only"
makedepends="
	cargo
	clang-dev
	gstreamer-dev
	gst-plugins-bad-dev
	gst-plugins-base-dev
	gtk4.0-dev
	libadwaita-dev
	meson
	pipewire-dev
	zbar-dev
	"
checkdepends="appstream-glib desktop-file-utils"
subpackages="$pkgname-dbg $pkgname-lang"
source="https://gitlab.gnome.org/World/Authenticator/-/archive/$pkgver/Authenticator-$pkgver.tar.gz"
builddir="$srcdir/Authenticator-$pkgver"

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
b86eec79baf036a33cb3d5076601efef94467d3a2c4577c59ea35d7e390b3f2ad4431b1162f760df9bd48f824e53b19fdf92c758b1b8f99ae7fef5aa1dff1d71  Authenticator-4.1.1.tar.gz
"
